<?php
/**
 * Created by Think cli.
 * Date: 2019-02-17 00:07:24
 */
namespace app\Lib\Model\DbModel;

use think\Model;

class UserBase extends Model
{


   /*
    * [备注信息:]
    * [数据类型:int]
    * [默认值:]
    */
   public $_id = "id";


   /*
    * [备注信息:账号]
    * [数据类型:varchar]
    * [默认值:]
    */
   public $_account = "account";


   /*
    * [备注信息:账号状态：1=>正常，0=>禁用]
    * [数据类型:tinyint]
    * [默认值:1]
    */
   public $_account_status = "account_status";


   /*
    * [备注信息:密码]
    * [数据类型:varchar]
    * [默认值:]
    */
   public $_password = "password";


   /*
    * [备注信息:联系手机]
    * [数据类型:varchar]
    * [默认值:]
    */
   public $_mobilephone = "mobilephone";


   /*
    * [备注信息:微信登录标识]
    * [数据类型:varchar]
    * [默认值:]
    */
   public $_weixin = "weixin";


   /*
    * [备注信息:最后一次登录时间]
    * [数据类型:int]
    * [默认值:]
    */
   public $_last_login_time = "last_login_time";


   /*
    * [备注信息:最后一次登录ip]
    * [数据类型:bigint]
    * [默认值:]
    */
   public $_last_login_ip = "last_login_ip";


   /*
    * [备注信息:1=》男性，2=》女性]
    * [数据类型:tinyint]
    * [默认值:1]
    */
   public $_sex = "sex";


   /*
    * [备注信息:注册ip]
    * [数据类型:bigint]
    * [默认值:]
    */
   public $_reg_ip = "reg_ip";


   /*
    * [备注信息:注册时间]
    * [数据类型:int]
    * [默认值:]
    */
   public $_reg_time = "reg_time";


   /*
    * [备注信息:生日]
    * [数据类型:int]
    * [默认值:]
    */
   public $_birthday = "birthday";


   /*
    * [备注信息:称号]
    * [数据类型:varchar]
    * [默认值:]
    */
   public $_nickname = "nickname";


   /*
    * [备注信息:qq号码]
    * [数据类型:varchar]
    * [默认值:]
    */
   public $_qq_number = "qq_number";


   /*
    * [备注信息:微信号码]
    * [数据类型:varchar]
    * [默认值:]
    */
   public $_weixin_number = "weixin_number";


   /*
    * [备注信息:邮箱]
    * [数据类型:varchar]
    * [默认值:]
    */
   public $_e_mail = "e_mail";

    /**
     * 获取用户id
     * @param string $account
     * @return mixed
     */
    static public function getUid($account =''){
        $model = new UserBase();
        return $model->where([$model->_account=>$account])->value($model->_id);
    }
}